﻿using System;
using NLite;
using NLite.Cfg;
using NLite.Domain.Cfg;
using NLite.Domain.Wcf;
using NLite.Persistence;
using NLite.Persistence.Cfg;
using NLite.Domain.Listener;
using Server.Domain;

namespace Server
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            var cfg = new Configuration();
            cfg.ConfigServer();

            cfg.Add(new DomainComponentConfigurationItem(container =>
            {
                //注册MVC插件
                //container.Register<ControllerListener>();

                LifestyleType.Default = LifestyleFlags.Transient;
                container.RegisteryFromAssemblyOf<CalculateService>();
            }));
          
          
        }
    }
}